package com.dd.stack.mybatisplus.pojo.enumeration;

import com.dd.stack.common.util.enumeration.CodedEnum;
import com.dd.stack.common.util.enumeration.DescribableEnum;
import lombok.AllArgsConstructor;

/**
 * @Author liuxianmeng
 * @CreateTime 2025/6/14 22:21
 * @Description 将Integer类型作为键的枚举
 */
@AllArgsConstructor
public enum IntCodeEnum implements CodedEnum<Integer>, DescribableEnum {

    FIRST("第一个枚举", 1),
    SECOND("第二个枚举", 2),
    THIRD("第三个枚举", 3);

    private final String desc;                // 枚举含义描述
    private final Integer code;               // 权限级别

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getDescription() {
        return desc;
    }
}

